<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core"  prefix="c"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/fmt"  prefix="fmt"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>后台管理 - 易买网</title>
<link type="text/css" rel="stylesheet" href="<%=path %>/resources/css/style.css" />
<script type="text/javascript" src="<%=path %>/resources/scripts/function-manage.js"></script>
</head>

<body>
<div id="header" class="wrap">
	<div id="logo"><img src="<%=path %>/resources/images/logo.gif" /></div>
	<div class="help"><a href="<%=path %>/main/index">返回前台页面</a></div>
	<div class="navbar">
		<ul class="clearfix">
			<li><a href="<%=path %>/manage">首页</a></li>
			<li><a href="<%=path%>/user/list">用户</a></li>
			<li class="current"><a href="<%=path%>/product/list">商品</a></li>
			<li><a href="<%=path%>/order/list">订单</a></li>
			<li><a href="<%=path %>/notice/notices">公告</a></li>
			<li><a href="<%=path %>/news/news">新闻</a></li>
		</ul>
	</div>
</div>
<div id="childNav">
	<div class="welcome wrap">
		管理员pillys您好，今天是2012-12-21，欢迎回到管理后台。
	</div>
</div>
<div id="position" class="wrap">
	您现在的位置：<a href="<%=path%>/main/index">易买网</a> &gt; 管理后台
</div>
<div id="main" class="wrap">
	<div id="menu-mng" class="lefter">
		<div class="box">
			<dl>
				<dt>用户管理</dt>
				<dd><em><a href="<%=path%>/user/add">新增</a></em><a href="<%=path%>/user/list">用户管理</a></dd>
				<dt>商品信息</dt>
				<dd><em><a href="<%=path%>/category/add">新增</a></em><a href="<%=path%>/category/list">分类管理</a></dd>
				<dd><em><a href="<%=path%>/product/add">新增</a></em><a href="<%=path%>/category/list">商品管理</a></dd>
				<dt>订单管理</dt>
				<dd><a href="<%=path%>/order/list">订单管理</a></dd>
				<dt>公告管理</dt>
				<dd><em><a href="<%=path%>/notice/add">新增</a></em><a href="<%=path %>/notice/notices">公告管理</a></dd>
				<dt>新闻管理</dt>
				<dd><em><a href="<%=path%>/news/add">新增</a></em><a href="<%=path %>/news/news">新闻管理</a></dd>
			</dl>
		</div>
	</div>
	<div class="main">
		<h2>分类管理</h2>
		<div class="manage">
			<table class="list">
				<tr>
					<th>ID</th>
					<th>分类名称</th>
					<th>操作</th>
				</tr>
		    <c:forEach var="cat" items="${catMap }">
		    	<tr>
					<td class="first w4 c">${cat.key.id }</td>
					<td>${cat.key.name }</td>
					<td class="w1 c"><a href="<%=path%>/category/${var.id }/update">修改</a> <a href="javascript:Delete(1);">删除</a></td>
				</tr>
		    <c:set value="${cat.value }" var="subItem"/>  
            <c:forEach items="${subItem }" var="var">
            	<tr>
					<td class="first w4 c">${var.id }</td>
					<td class="childClass">${var.name }</td>
					<td class="w1 c"><a href="<%=path%>/category/${var.id }/update">修改</a> <a href="javascript:Delete(1);">删除</a></td>
				</tr>
            </c:forEach>  
            </c:forEach>
			</table>
		</div>
	</div>
	<div class="clear"></div>
</div>
<div id="footer">
	Copyright &copy; 2017 爱苗科技 All Rights Reserved. 皖ICP证000001号
</div>
</body>
</html>